<template>
  <div class="my-header">
    <h1>添加任务</h1>
    <input :value="value" type="text" @input="changeInp" @keydown.enter="add" />
  </div>
</template>

<script>
export default {
  props: ["value"],
  data() {
    return {};
  },
  methods: {
    changeInp(e) {
      this.$emit("input", e.target.value);
    },
    add() {
      this.$emit("add");
    },
  },
  created() {},
  mounted() {},
  components: {},
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped>
.my-header {
  input {
    width: 100%;
    height: 50px;
    border-radius: 5px;
  }
}
</style>
